x86/mm: introduce modify_xen_mappings()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 26 Apr 2016 11:46:26 +0000 (13:46 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 26 Apr 2016 11:46:26 +0000 (13:46 +0200)
commit36e2f084ecb631838f04d73c6f7dc6bb305d0fe4
tree3505af51963995fd3324f1b4a75b92cd8188ac12
parent722b6d259f408b80c40e3ddb6b5909414be31f57
x86/mm: introduce modify_xen_mappings()

To simply change the permissions on existing Xen mappings.  The existing
destroy_xen_mappings() is altered to support changing the PTE permissions.

A new destroy_xen_mappings() is introduced, as the special case of not passing
_PAGE_PRESENT to modify_xen_mappings().

As cleanup (and an ideal functional test), the boot logic which remaps Xen's
code and data with reduced permissions is altered to use
modify_xen_mappings(), rather than map_pages_to_xen() passing the same mfn's
back in.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: George Dunlap <george.dunlap@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/mm.c
xen/arch/x86/setup.c
xen/include/xen/mm.h